<?php
/*
 * $Gps = Factory::create('google_weather');
 */

class Factory {
	private function __construct() {}
	
	public static function create($type)
	{
		if (include_once 'class.' . $type . '.php') {
            $classname = ($type == 'google_weather') ? 'GoogleWeather' : $type;
            return new $classname;
        } else {
            throw new Exception ('Driver not found');
        }
	}
}
?>